package com.zhouxiaoge.方法参数;

/**
 * @author 周明阳
 * mail:gqzmy@outlook.com
 * 时间:2018-04-24 11:34
 */

public class Employee {
    private String name;
    private double salary;

    @Override
    public String toString() {
        return "Employee{" + "name='" + name + '\'' + ", salary=" + salary + '}';
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getSalary() {
        return salary;
    }

    public void setSalary(double salary) {
        this.salary = salary;
    }

    public Employee() {

    }

    public Employee(String name, double salary) {

        this.name = name;
        this.salary = salary;
    }

    public void raiseSalary(double byPercent) {
        double raise = salary * byPercent / 100;
        salary += raise;
    }
}
